<template>
	<view class="WriteOffResult">
		<u-navbar title="核销结果" :custom-back="yth" :border-bottom="false"></u-navbar>
		<view class="w1">共核销{{ info.hx_num }}件商品，请出示给服务站确认</view>
		<!-- <view class="w2">提货人：微信昵称</view> -->
		<view class="w2">核销站点：{{ info.fwz_title }}</view>
		<view class="w2">订单号：{{ info.order_num }}</view>
		<view class="w2">核销时间：{{ info.create_time }}</view>
		<view class="w6">核销明细</view>
		<view class="msg_info">
			<img :src="info.map_image" alt="" class="img" />
			<view class="wrap">
				<view class="name">{{ info.goods_title }}</view>
				<view class="b">
					共{{ info.hx_num }}张
					<!-- <view class="c">(已核销0件)</view> -->
				</view>
			</view>
		</view>
		<view class="bt bt1" @click="home">返回首页</view>
	</view>
</template>

<script>
export default {
	data() {
		return {
			info: {}
		};
	},
	onLoad(option) {
		this.info = JSON.parse(option.info);
		console.log(this.info);
		this.info.create_time = this.$moment(this.info.create_time * 1000).format('YYYY-MM-DD hh:mm:ss');
	},
	methods: {
		yth() {
			let page = getCurrentPages();
			let sPage = page[page.length - 3];
			uni.navigateBack({
				delta: 2,
				success() {
					sPage.$vm.search();
				}
			});
		},
		home() {
			uni.reLaunch({
				url: '/pages/home/home'
			});
		}
	}
};
</script>

<style lang="scss">
.WriteOffResult {
	padding-bottom: constant(safe-area-inset-bottom); /*兼容 IOS<11.2*/
	padding-bottom: env(safe-area-inset-bottom); /*兼容 IOS>11.2*/
	margin: 0 32rpx;
	.w1 {
		font-size: 36rpx;
		font-weight: 400;
		color: rgba(51, 51, 51, 1);
		margin-top: 20rpx;
	}
	.w2 {
		font-size: 28rpx;
		font-weight: 400;
		color: rgba(102, 102, 102, 1);
		margin-top: 20rpx;
	}
	.w6 {
		font-size: 36rpx;
		font-weight: 400;
		color: rgba(51, 51, 51, 1);
		margin-top: 40rpx;
	}
	.msg_info {
		display: flex;
		padding: 32rpx 0;
		.img {
			width: 168rpx;
			height: 168rpx;
		}
		.wrap {
			height: 168rpx;
			margin-left: 20rpx;
			width: 60%;
			position: relative;
			.name {
				font-size: 28rpx;
				font-weight: 400;
				color: rgba(51, 51, 51, 1);
				display: -webkit-box; /* 兼容旧版浏览器 */
				-webkit-line-clamp: 2; /* 显示两行 */
				-webkit-box-orient: vertical; /* 子元素在垂直方向排列 */
				overflow: hidden;
				text-overflow: ellipsis;
			}
			.tipsB {
				font-size: 22rpx;
				font-weight: 400;
				color: rgba(102, 102, 102, 1);
				margin-top: 16rpx;
			}
			.b {
				position: absolute;
				bottom: 0;
				right: 0;
				left: 0;
				display: flex;
				align-items: flex-end;
				font-size: 30rpx;
				font-weight: 400;
				color: rgba(51, 51, 51, 1);
				.c {
					color: rgba(153, 153, 153, 1);
				}
			}
		}
	}
	.bt {
		width: 604rpx;
		height: 84rpx;
		border-radius: 196rpx;
		border: 2rpx solid rgb(255, 67, 73);
		background: rgb(255, 67, 73);
		display: flex;
		justify-content: center;
		align-items: center;
		font-size: 32rpx;
		font-weight: 400;
		color: rgba(255, 255, 255, 1);
		margin: 40rpx auto;
	}
	.bt1 {
		border: 2rpx solid rgb(119, 119, 119);
		background: none;
		color: rgb(119, 119, 119);
	}
}
</style>
